using System.Runtime.Serialization;

namespace MiniStock.Entities.Stock.Events.Customer
{
    [DataContract]
    public class ChangeShippingAddressEvent : AddressChangeEvent
    {
        public override void ApplyTo(Common.EntityBase entity)
        {
            base.ApplyTo(entity);
            ((Stock.Customer)entity).ShippingAddress = new Address()
            {
                City = this.City,
                State = this.State,
                StreetName = this.StreetName,
                StreetNumber = this.StreetNumber,
            };
        }
    }
}